Imports ModuloAdministraciondeEnvios.DataAccessLayer
Imports ModuloAdministraciondeEnvios.BusinessLogicLayer

Namespace PresentationLayer
    Public Class FrmDespacharEnvios

        Private Sub FrmDespacharEnvios_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            LabelUso.Text = "Este proceso copia los envisoa la unidad movil ubicada en el UNIDAD, UNA DESPACHADOS NO SE PUEDE MODIFICAR "

            DataGridViewEnvios.RowHeadersVisible = False
            DataGridViewEnvios.AllowUserToAddRows = False
            DataGridViewEnvios.AllowUserToOrderColumns = False

            TraerEnviosaGrid()










        End Sub



        Public Sub TraerEnviosaGrid()

            Try
                Me.DataGridViewEnvios.DataSource = ""
                Me.DataGridViewEnvios.Columns.Remove("Detalle")
            Catch ex As Exception

            End Try

            Dim n1 As New DataEnvio
            Dim TraerDatos As IEnvio = DirectCast(n1, IEnvio)
            Datos = TraerDatos.TraerEnviosCompletosPorFechas("01/01/10", "31/12/10", 2)
            Me.DataGridViewEnvios.DataSource = Datos.Tables(0)

            Dim Columna1 As New DataGridViewCheckBoxColumn
            Columna1.HeaderText = "Despachar"
            Columna1.Name = "Despachados"
            Me.DataGridViewEnvios.Columns.Insert(1, Columna1)

            For Each row As DataGridViewRow In Me.DataGridViewEnvios.Rows
                '    row.Cells(1).Value = row.Cells(15).Value
            Next

      
            Me.DataGridViewEnvios.AutoResizeColumns()
            Me.DataGridViewEnvios.Update()

        End Sub






        Private Sub ButtonDespacharEnvios_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDespacharEnvios.Click



            For Each row As DataGridViewRow In Me.DataGridViewEnvios.Rows

               
                If row.Cells(1).Value = True Then

                    MsgBox(row.Cells(0).Value)

                End If



            Next





        End Sub

        Private Sub DataGridViewEnvios_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridViewEnvios.CellContentClick

        End Sub
    End Class
End Namespace